package data.nanjing.expo.models.dao;

import data.nanjing.expo.models.domain.UserFavorite;
import data.nanjing.expo.models.domain.dto.FavoriteShow;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by zjp on 2018/6/28.
 * QQ：34948062
 * github: https://www.github.com/zjp1029
 * web： http://www.zjp1029.cn
 */
public interface UserFavoriteDao {

    //添加收藏
    public Integer addUserFavorite(UserFavorite userFavorite);

    //查询数量
    public Integer selectFavoriteCountByUserIdAndType(@Param("userId") Integer userId, @Param("type") String type, @Param("favoriteId") Integer favoriteId);

    //取消收藏
    public void deleteFavoriteByUserIdAndType(@Param("userId") Integer userId, @Param("type") String type, @Param("favoriteId") Integer favoriteId);

    public List<FavoriteShow> selectActivityFavoriteByUserId(@Param("userId") Integer userId,
                                                             @Param("pageStart") Integer pageStart, @Param("pageSize") Integer pageSize);

    //收藏总数
    public Integer selectActivityFavoriteCountByUserId(@Param("userId") Integer userId);
}
